#{extends 'main.html' /} #{set title:'Home' /}

<div id=main>

<br>
<br>
#{if empty ==true}
<h1>${user.name}, You have no invitations!</h1>
#{/if}

#{if empty ==false}
		<h1>${user.name}'s Invitations</h1>
		<ul>
			#{list items:invitation, as:'invitation'}
			<li>${invitation.message} 
				<form name="accept" action="@{Invitations.accept(invitation.id)}" method="Post">
<input type ="submit" name="Invitations" value = "Accept invitation"/>
 </form>
 <form name="reject" action="@{Invitations.reject(invitation.id)}" method="Post">
<input type ="submit" name="Invitations" value = "Reject invitation"/> 
	</form>
					</li> 
			#{/list}
		</ul>
	

#{/if}

</div>